import request from '@/utils/request'
//首页管理
export function addIndex(data) {
  return request({
    url: '/system/information',
    method: 'post',
    data: data
  })
}
export function getIndexList(data) {
  return request({
    url: '/system/information/list',
    method: 'get',
    params: data
  })
}
export function getIndexListInfo(inforId) {
  return request({
    url: `/system/information/${inforId}`,
    method: 'get',
    params: inforId
  })
}
export function IndexListInfoEdit(data) {
  return request({
    url: `/system/information`,
    method: 'put',
    data: data
  })
}
export function IndexListInfoDelete(inforId) {
  return request({
    url: `/system/information/${inforId}`,
    method: 'delete',
  })
}
//商品管理
export function getGoodsList(params) {
  return request({
    url: `/system/goods/list`,
    method: 'get',
    params
  })
}
export function addGoods(data) {
  return request({
    url: `/system/goods`,
    method: 'post',
    data
  })
}

export function EditGoods(data) {
  return request({
    url: `/system/goods`,
    method: 'put',
    data
  })
}
export function getGoodsInfo(goodsId) {
  return request({
    url: `/system/goods/${goodsId}`,
    method: 'get'
  })
}
export function delGoodsInfo(goodsId) {
  return request({
    url: `/system/goods/${goodsId}`,
    method: 'delete'
  })
}
//充值/提现管理
export function getRecordList(data) {
  return request({
    url: `/system/record/list`,
    method: 'get',
    params:data
  })
}
export function addRecharge(data) {
  return request({
    url: `/system/record/recharge`,
    method: 'post',
    data:data
  })
}
//订单
export function getOrderList(params) {
  return request({
    url: `/system/order/list`,
    method: 'get',
    params
  })
}
//客户列表
export function getWxList(params) {
  return request({
    url: `/system/user/wxList`,
    method: 'get',
    params
  })
}
export function getDictObj(value) {
  return request({
    url: `/system/dict/data/type/${value}`,
    method: 'get',
  })
}
export function batchFinish(orderIds) {
  return request({
    url: `/system/order/${orderIds}`,
    method: 'get',
  })
}
export function orderCancel(orderId) {
  return request({
    url: `/system/order/htCancelOrder?orderId=${orderId}`,
    method: 'get',
  })
}